<div>
  <h2>
    栏目 
    <button type="button" class="btn btn-info" ui-sref="categoryEdit">添加</button>
    <button type="button" class="btn btn-warning" ng-click="createMenu()">生成首页菜单</button>
  </h2>
</div>
<div>
  <table class="table table-striped table-hover">
    <thead>
      <tr>
        <th class="opr-td">操作</th>
        <th>编号</th>
        <th>名称</th>
      </tr>
    </thead>
    <tbody>
      <tr ng-repeat="category in vm.categorys">
        <td class="opr-td">
          <button type="button" class="btn btn-xs btn-primary" ui-sref="categoryEdit({id:{{category.id}}})">修改</button>
          <button type="button" class="btn btn-xs btn-danger" ng-click="del(category,$index)">删除</button>
        </td>
        <td>{{category.code}}</td>
        <td>{{category.name}}</td>
      </tr>
    </tbody>
  </table>
</div>
